package com.micro.play.internet.audio.book.domain.controller;


import com.micro.play.internet.audio.book.config.prop.AppPropertiesConfig;
import com.micro.play.internet.audio.book.domain.pojo.em.WebsiteType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 主页显示
 *
 * @author guochaohui
 */
@Controller
public class IndexController extends BaseController {

    @Autowired
    private AppPropertiesConfig appPropertiesConfig;

    @RequestMapping(value = "/")
    public String indexPage(Model model) {
        model.addAttribute("websiteTypes", WebsiteType.values());
        model.addAttribute("playServiceApiUrl", appPropertiesConfig.getPlayServiceApiUrl());
        return "index";
    }

}
